<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .h1 {
            position: absolute;
            font-size: 100px;
            background:linear-gradient(red,yellow);
            -webkit-background-clip: text;
            color: transparent;
            font-style: italic;
            animation-name: h1;
            margin-left: 100px;
            animation-duration: 3s;
            animation-timing-function: ease;
        
            animation-iteration-count: 1;
           
            
        }

        .box1 {
            width: 160px;
            height: 190px;

            background-image: url("../image/精灵图.png");
            background-repeat: no-repeat;
            background-position-x: -310px;
            background-position-y: -190px;
            animation-name: box1;
            animation-duration: 3s;
            animation-timing-function: ease;
            animation-iteration-count: 1;
            animation-fill-mode: forwards;
        }

        .box2 {
            width: 160px;
            height: 190px;

            background-image: url("../image/精灵图.png");
            background-repeat: no-repeat;
            background-position-x: -530px;
            background-position-y: -780px;
            animation-name: box2;
            animation-duration: 3s;
            animation-timing-function: ease;
            animation-iteration-count: 1;
            animation-fill-mode: forwards;

        }

        .box3 {
            width: 160px;
            height: 190px;

            background-image: url("../image/精灵图.png");
            background-repeat: no-repeat;
            background-position-x: -700px;
            background-position-y: -380px;
            animation-name: box3;
            animation-duration: 3s;
            animation-timing-function: ease;
            animation-iteration-count: 1;
            animation-fill-mode: forwards;
        }
        @keyframes h1{
            0%{
                top: -200px;
            }
            100%{
                top: 200px;
            }
        }
        @keyframes box1 {
            0% {
                margin-left: 0;
            }

            100% {
                margin-left: 900px;
            }
        }

        @keyframes box2 {
            0% {
                margin-left: 0;
            }

            100% {
                margin-left: 700px;
            }
        }

        @keyframes box3 {
            0% {
                margin-left: 0;
            }

            100% {
                margin-left: 500px;
            }
        }
    </style>
</head>

<body>
    <h1 class="h1">精灵图作业</h1>
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
</body>

</html>